{% extends "_public/main.phtml" %}
{% block seo %}
<title>{{ article.title }} - {{ article.category.title|default("未分类文章") }} - {{ site_config.site_name}}</title>
{% endblock %}
{% block sitetitle %}

<br><br><br><br><br><br><br>

{% endblock %}

{% block article %}

<section class="index-main">
    <div class="container">
        <div class="row">
            <div class="col-md-8">
                <article class="article-content">
                    <h1>{{ article.title }}</h1>
                    <div class="article-tags">
                        {% for tag in article.tags %}
                        <a href="tags/{{ tag.id }}.html" class="badge badge-info" title="{{ tag.tag }} 标签下的文章">{{ tag.tag }}</a>
                        {% endfor %}
                    </div>
                    <div class="article-info">
                        <span>{{ article.create_time | date('Y-m-d H:i') }}</span>
                        <span>热度 {{ article.click }} ℃</span>
                    </div>
                    {% if article.thumb != '' %}
                    <div class="article-thumb"><img src="{{ article.thumb }}" alt="{{ article.title }}" title="{{ article.title }}"/></div>
                    {% endif %}
                    <div class="article-abstract">
                        {{ article.content | raw}}
                    </div>
                </article>
                <div class="article-reply">
                    <form action="/reply/commit.html" method="post">
                        <h3 class="blog-comment">评论</h3>
                        <div class="row">
                            <div class="col form-group">
                                <input type="text" name="name" class="form-control" placeholder="姓名">
                            </div>
                            <div class="col">
                                <input type="text" name="qq" class="form-control" placeholder="qq">
                            </div>
                            <div class="col">
                                <input type="text" name="website" class="form-control" placeholder="个人网站">
                            </div>
                        </div>
                        <div class="form-group">
                            <textarea class="form-control" name="content" rows="3" placeholder="一字千金"></textarea>
                        </div>
                        <div class="row">
                            <div class="col form-group">
                                <img src="/captcha.html" alt="captcha">
                            </div>
                            <div class="col">
                                <input type="text" name="verify_code" class="form-control" placeholder="验证码">
                            </div>
                        </div>
                        <input type="hidden" name="article_id" value="{{ article.id }}">
                        <button type="submit" class="btn btn-light">提交</button>
                    </form>
                </div>
                <div class="reply-list border">
                    {% for reply in article.replies %}
                    {% if reply.state == 1 %}
                    <div class="reply-item">
                        <div class="reply-content">
                            <p>
                                {{ reply.content }}
                            </p>
                        </div>
                        <div class="reply-foot">
                            由 <a href="{{ reply.website }}">{{ reply.name }}</a>  评论于： <span>{{ reply.create_time | date('Y-m-d H:i') }}</span>
                        </div>
                    </div>
                    {% endif %}
                    {% endfor %}
                </div>
            </div>
            <div class="col-md-4">

                {{ include('_public/tags.phtml')}}

                {{ include('_public/reply.phtml')}}

            </div>
        </div>
    </div>
</section>

{% endblock %}